using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;

namespace UserManagementService.Users;

/// <summary>
/// 用户管理应用服务接口
/// </summary>
public interface IUserAppService : IApplicationService
{
    /// <summary>
    /// 获取用户分页列表
    /// </summary>
    Task<PagedResultDto<UserDto>> GetListAsync(GetUserListInput input);

    /// <summary>
    /// 获取用户详情
    /// </summary>
    Task<UserDto> GetAsync(Guid id);

    /// <summary>
    /// 创建用户
    /// </summary>
    Task<UserDto> CreateAsync(CreateUserDto input);

    /// <summary>
    /// 更新用户
    /// </summary>
    Task<UserDto> UpdateAsync(Guid id, UpdateUserDto input);

    /// <summary>
    /// 删除用户
    /// </summary>
    Task DeleteAsync(Guid id);

    /// <summary>
    /// 设置用户密码
    /// </summary>
    Task<UserDto> SetPasswordAsync(Guid id, SetPasswordDto input);

    /// <summary>
    /// 修改用户密码
    /// </summary>
    Task<UserDto> ChangePasswordAsync(Guid id, ChangePasswordDto input);

    /// <summary>
    /// 激活用户
    /// </summary>
    Task<UserDto> ActivateAsync(Guid id);

    /// <summary>
    /// 停用用户
    /// </summary>
    Task<UserDto> DeactivateAsync(Guid id);

    /// <summary>
    /// 获取用户权限列表
    /// </summary>
    Task<List<string>> GetPermissionsAsync(Guid id);

    /// <summary>
    /// 授予用户权限
    /// </summary>
    Task GrantPermissionAsync(Guid id, GrantPermissionDto input);

    /// <summary>
    /// 撤销用户权限
    /// </summary>
    Task RevokePermissionAsync(Guid id, RevokePermissionDto input);
}